// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	2/16/2015 8:05:31 PM				
// -----------------------------

#ifndef _CGraphicsDevice_h
#define _CGraphicsDevice_h

#include "IGraphicsDevice.h"
#include "DxIncludes.h"

namespace Flow
{

	class CGraphicsDevice : public IGraphicsDevice
	{
	public:
		CGraphicsDevice();
		virtual ~CGraphicsDevice();

		virtual void	Release();

		virtual Bool	Initialize(IWindow* lpWindow);
		virtual Bool	InitializeView(IWindow* lpWindow);

		virtual void	Begin(Float r, Float g, Float b) const;
		virtual void	End() const;

		ID3D11Device*			GetDevice()			{ return m_lpDevice; }
		ID3D11DeviceContext*	GetContext()		{ return m_lpDeviceContext; }

	private:

		ID3D11Device*			m_lpDevice;
		ID3D11DeviceContext*	m_lpDeviceContext;
		IDXGISwapChain*			m_lpSwapChain;
								  
		ID3D11RenderTargetView* m_lpBackBufferView;
		ID3D11Texture2D*		m_lpDepthStencil;
		ID3D11DepthStencilView* m_lpDepthStencilView;

		CGraphicsDevice(const CGraphicsDevice& refCGraphicsDevice);
		CGraphicsDevice& operator=(const CGraphicsDevice& refCGraphicsDevice);
	};

}

#include "ExportMacro.h"
EXPORT_IMPLEMENTATION(GraphicsDevice);

#endif